package com.orion.app.domain.entity;

import java.util.Date;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;
import org.springframework.roo.classpath.operations.jsr303.RooUploadedFile;

@RooJavaBean
@RooToString
@RooJpaActiveRecord
@RooJpaEntity(sequenceName = "emp_bnk_det_seq")
public class EmployeeBankDetail {

    @NotNull
    @ManyToOne
    private EmployeeDetails employee;

    @RooUploadedFile(contentType = "application/msword", autoUpload = true)
    @Lob
    private byte[] bankDocument;

    @Size(max = 200)
    private String accountNumber;

    @Size(max = 100)
    private String documentType;

    @Size(max = 100)
    private String employeeCode;

    @Size(max = 100)
    private String fileName;

    @Size(max = 200)
    private String csoRemark;

    @Size(max = 100)
    private String status;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date uploadDate;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date csoUpdationDate;
}
